package com.wcar.vipmanagement.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wcar.common.entity.UserAddress;
import com.wcar.common.vo.Result;
import com.wcar.common.entity.StoreAddress;
import com.wcar.vipmanagement.service.impl.AddressServiceImpl;
import com.wcar.vipmanagement.service.impl.FrontUserServiceImpl;
import com.wcar.vipmanagement.vo.AddressVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/car")
public class AddressController {
    @Autowired
    private AddressServiceImpl addressService;

    @PostMapping("/AddressManagement")
    public Result<IPage<UserAddress>> AddressManagement(@RequestBody AddressVo addressVo) {
        return addressService.getAddressList(addressVo);
    }
    @PostMapping("/updateAddress")
    public Result<String> updateAddress(@RequestBody UserAddress storeAddress) {
        return addressService.updateAddress(storeAddress);
    }


}
